<?php
/**
 * 律师管理模块路由配置
 * 路由规范化完成标记 - 已按照ROUTE_STANDARDIZATION_PLAN.md统一为/api前缀路由
 */

use think\facade\Route;

// 律师相关路由
Route::group('api/lawyer', function () {
    Route::get('/list', 'lawyer.Lawyer/list');              // 查看律师列表
    Route::get('/view', 'lawyer.Lawyer/view');              // 查看单个律师信息
    Route::post('/add', 'lawyer.Lawyer/add');               // 新增律师
    Route::put('/edit', 'lawyer.Lawyer/edit');              // 编辑律师
    Route::delete('/del', 'lawyer.Lawyer/del');             // 删除律师（软删除）
    Route::get('/set', 'lawyer.Lawyer/set');                // 获取启用的律师列表（用于下拉选择）
});

// 律所相关路由
Route::group('api/lawyer/lawfirm', function () {
    Route::get('/list', 'lawyer.Lawfirm/list');             // 查看律所列表
    Route::get('/view', 'lawyer.Lawfirm/view');             // 查看单个律所信息
    Route::post('/add', 'lawyer.Lawfirm/add');              // 新增律所
    Route::put('/edit', 'lawyer.Lawfirm/edit');             // 编辑律所
    Route::delete('/del', 'lawyer.Lawfirm/del');            // 删除律所（软删除）
    Route::get('/set', 'lawyer.Lawfirm/set');               // 获取启用的律所列表（用于下拉选择）
});

// 律师同步相关路由
Route::group('api/lawyer/sync', function () {
    Route::post('/sync_lawyer_to_user', 'lawyer.LawyerSyncController/syncLawyerToUser');    // 同步单个律师到用户系统
    Route::post('/batch_sync', 'lawyer.LawyerSyncController/batchSyncLawyers');            // 批量同步律师到用户系统
    Route::get('/get_syncable_lawyers', 'lawyer.LawyerSyncController/getSyncableLawyers');  // 获取可同步的律师列表
});

// 律师登录权限相关路由
Route::group('api/lawyer/lawyer', function () {
    Route::post('/toggle_login_permission', 'lawyer.Lawyer/toggleLoginPermission');  // 切换律师登录权限
    Route::get('/get_law_firm_lawyers', 'lawyer.Lawyer/getLawFirmLawyers');       // 获取律所律师列表
});

// 律师管理模块路由规范化完成标记
// ROUTE_STANDARDIZATION_DONE: lawyer.php - 所有律师管理模块路由已统一使用/api前缀